package com.glorystone.ins.dao;

import com.glorystone.ins.common.common.PageVo;
import com.glorystone.ins.common.common.Pageable;
import com.glorystone.ins.domain.Channel;
import com.glorystone.ins.domain.ChannelExample;
import com.glorystone.ins.domain.Member;
import com.glorystone.ins.interceptor.PageList;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ChannelMapper {
    int countByExample(ChannelExample example);

    int insert(Channel channel);

    int insertSelective(Channel channel);

    int insertMember(Member member);

    List<Channel> selectByExample(ChannelExample example);

    int updateByExampleSelective(@Param("record") Channel record, @Param("example") ChannelExample example);

    int updateByExample(@Param("record") Channel record, @Param("example") ChannelExample example);

    int updateByPrimaryKeySelective(Channel record);

    int updateByPrimaryKey(Channel record);

    PageList<Channel> findList(@Param("vo") PageVo vo, Pageable pageable, @Param("userId") Long userId);

    PageList<Channel> findPresonalList(PageVo vo, Pageable pageable);

    List<Channel> getChannelList(Map<String,String> map);

    List<Channel> getChannel(Map<String,String> map);

    public Channel getById(Long tid);

    void update(Channel channel);

    Channel findByUserId(Long userId);

    List<Channel> findAll();

    List<Channel> findAllChannelName(@Param("name")String name);

    void updateList(List<Channel> list);

    void updateToCreditOverdue(List<Long> ids);

    void deleteById(Long tid);
}